package com.drod.numberpatternunlock;

import android.app.Activity;
import android.app.KeyguardManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
import android.os.Bundle;
import android.os.PowerManager;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.ViewGroup.MarginLayoutParams;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.Toast;
import android.widget.RelativeLayout.LayoutParams;

public class MainActivity extends Activity {
	BroadcastReceiver br;
	KeyguardManager km;
	boolean locked;
	
	
	@Override

	public void onCreate(Bundle savedInstancedState) {
		super.onCreate(savedInstancedState);
		System.out.println("APP STARTED");
		if(isLocked())
			setContentView(R.layout.activity_main);
		onCreate(savedInstancedState);
				
	}
	public boolean isLocked(){
		km = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
		return km.inKeyguardRestrictedInputMode();
	}
}


